package com.jwdf.uda.ui.fragment.progress;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/11/10.
 */
public class LongTask implements Serializable {

    private static LongTask instance = null;
    private List<TaskList> listList = new ArrayList<>();

    public static synchronized LongTask getInstance() {
        if(instance == null) {
            instance = new LongTask();
        }
        return instance;
    }

    public List<TaskList> getListList() {
        return listList;
    }
    public void setListList(List<TaskList> listList) {
        this.listList = listList;
    }
    public void setListList(TaskList listList) {
        this.listList.add(listList);
    }
    public void deleteTaskList(int i) {
        this.listList.remove(i);
    }
    public void deleteTaskList(String type) {
        for(int i = 0; i < listList.size(); i++) {
            if(listList.get(i).getType().equals(type)) {
                listList.remove(i);
            }
        }


    }
    public void deleteTaskList(){
        listList.clear();
    }
}
